Florian Müllner [Mon, 8 Aug 2022 10:08:26 +0000 (12:08 +0200)]
status/bluetooth: Add device menu
The new quick toggle gives us a good place for exposing connected
and connectable devices. This was part of the original mockups,
but didn't make the cut for GNOME 43 due to time constraints.
Florian Müllner [Wed, 8 Feb 2023 00:34:47 +0000 (01:34 +0100)]
status/volume: Mute/unmute when clicking icon
This behavior was lost with the move to quick settings. Now that
we allow slider icons to be interactive, we can easily restore
the feature (and even in a less-Easter-eggy way)
Florian Müllner [Wed, 8 Feb 2023 00:32:52 +0000 (01:32 +0100)]
quickSettings: Allow interactive slider icons
Before the move to quick settings, it was possible to mute the volume
by clicking to the left of the slider. In order to re-enable that
feature, allow slider icons to be interactive.
Carlos Garnacho [Fri, 10 Feb 2023 14:07:50 +0000 (15:07 +0100)]
window-tracker: Only emit ::tracked-windows-changed on title changes
Since commit a1d650ce27, window title changes are listened for in the
ShellWindowTracker in order to emit ::tracked-windows-changed when
there are window title changes.
The rest of the things that happen in between (removing the window
from a ShellApp, possibly have it destroyed, and possibly creating a
new ShellApp to re-insert the window) are superfluous and even result
in the altTab switcher popup ending up confused about the applications
available.
Only emit the signal so changes can be followed on D-Bus, but avoid
the ShellApp fiddling otherwise.
Fixes: a1d650ce27 - window-tracker: Emit 'tracked-windows-changed' on title changes Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6385
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2634>
Florian Müllner [Wed, 18 Jan 2023 16:46:35 +0000 (17:46 +0100)]
quickSettings: Add small border to menu toggles
The slightly lighter background of the menu button turned out
to not be quite enough to indicate that it's a separate control
from the main toggle. Address this with a small border between
the two elements.
Florian Müllner [Mon, 22 Aug 2022 23:29:10 +0000 (01:29 +0200)]
quickSettings: Split menu toggle
Menu toggles are currently regular toggles with an additional
arrow button. This allows for a simpler implementation, but
has downsides with regards to keyboard navigation and hover
feedback.
To make it more obvious that the two parts of the menu toggle
perform different actions, change the overall structure of the
toggle to *contain* a regular toggle and the menu button.
That way each element uses its own hover effect, and shows up
in the keynav focus chain.
Florian Müllner [Fri, 7 Oct 2022 12:21:08 +0000 (14:21 +0200)]
status/volume: Use same icon for slider/top bar
Currently the icon in the top bar indicates the volume level, while
the icon next to the slider indicates the type of output (speaker
or headphone). The speaker- and volume icons are quite similar,
but different enough to feel inconsistent, so use the volume one
in both cases.
Florian Müllner [Fri, 2 Dec 2022 19:52:44 +0000 (20:52 +0100)]
layout: Add work-around for testing greeter UI in nested
Testing the greeter UI in nested has been broken for a long time
now, because the backend isn't ready yet when we try to push a
modal (via the screen shield).
As running nested is only relevant for development and testing,
working around the issue rather than fixing it properly seems
fine, so do just that and slightly delay startup when testing
the greeter UI.
Jonas Dreßler [Wed, 8 Feb 2023 15:42:18 +0000 (16:42 +0100)]
Add ClutterFrame arguments to after-paint signal handlers
The ClutterFrame argument was added to several signals with mutter commit 08b0e563d4d0088e19d24f3199626a2d27349d09. We have a bunch of after-paint
handlers in gnome-shell too, and updating those was apparently forgotten,
introducing subtle memory corruption that was luckily easy to track down by
running gnome-shell with ASAN enabled. Let's fix that and add the additional
argument to all the signal handlers.
sunflowerskater [Fri, 13 Jan 2023 17:29:13 +0000 (14:29 -0300)]
a11y menu: Add "All Accessibility Settings" entry
Unlike other top bar menus, the accessibility menu doesn't provide
quick access to the corresponding settings. It's still useful, given
that not all settings are exposed in the menu, so add a settings entry.
Jonas Ådahl [Thu, 2 Feb 2023 15:28:06 +0000 (16:28 +0100)]
Add 'headless start' perf test
This tests that GNOME Shell will launch sucessfully despite there being
no monitors on startup, and successfully hide and then show the
overview, once the monitor is connected.
Jonas Ådahl [Thu, 2 Feb 2023 15:04:10 +0000 (16:04 +0100)]
perf-tool: Add --hotplug option
The --hotplug option works together with --headless and makes the perf
tool not add a persistant virtual monitor, allowing the perf test
themselves able to handle monitors.
Jonas Ådahl [Thu, 2 Feb 2023 14:54:05 +0000 (15:54 +0100)]
overviewControls: Don't hide destroyed child widget on unmap
When we unmap, the child widgets have already been destroyed, so we
shouldn't try to. To detect this, delete the references we keep to them
on destroy, and null-check the hide call.
Jonas Ådahl [Thu, 2 Feb 2023 14:52:03 +0000 (15:52 +0100)]
overviewControls: Update work area also on monitors-changed
The cached work area, which is the work area of the primary monitor,
effectively depends on two properties - the (global) work area and the
primary monitor - and we are only tracking changes to one of them. Also
track monitor changes to also cover the second case.
Jonas Ådahl [Thu, 2 Feb 2023 14:36:49 +0000 (15:36 +0100)]
layout: Disconnect 'monitors-changed' handler on shutdown
Doing it ourselves in the shutdown handler in layout.js means we won't
risk reacting to monitor changes that happen after gnome-shell prepares
to shutdown and the signal handler would disconnect itself in case we
used `connectObject(..)`.
This will currently never happen, but in the future perf tests will be
able to create virtual monitors for testing purposes, and they might get
destroyed during the shutdown procedures, causing us to react to them
when we shouldn't.
Thanks to NetworkManager's connection name disambiguation, it's
pretty common for single wired connections to be named "Wired". This
is fine and what we want almost all times, but in the specific case
of quick settings, we already have a "Wired" string set as title of
the quick settings toggle, so having that as subtitle is reduntant.
Hide the subtitle label (by returning null) when the subtitle of
a wired network matches the title.
status/network: Title mobile connections as "Mobile"
As per the latest mockups, modem network connections are labeled
"Mobile". Override _getDefaultName in NMModemToggle and always
return "Mobile" as title.
status/network: Title bluetooth connections as "Tether"
As per the latest mockups, Bluetooth network connections are simply
labeled "Tether". Override _getDefaultName in NMBluetoothToggle
and always return "Tether" as title.
If there is a single connection for a given NMToggle subclass,
use the connection name; otherwise, transform that into '%d
connected'. This is better than the current "Device (counter)"
template, e.g. "VPN (2)", which would give us a quick toggle
with:
Following the previous commits where we left the quick toggle title
open for the new title scheme, set the titles for all network pills
to what currently is the "default" name.
That means, we pull the device name from Network Manager for devices,
through the disambiguate function, and hardcode 'VPN' for VPN
connections.
status/powerProfiles: Set profile name as subtitle
Just like with network names, set the name of the power profile as
the subtitle of the quick settings pill. This allows more of the
power profile name to be visible, and reduces chances of ellipsing
the name.
Rename the 'title' variable to 'name', to be more semantic and
better represent what it is now.
We'll soon add a subtitle, so rename the label property to something
that is a bit more semantic.Add a warning when trying to set the old
'label' property.
Florian Müllner [Tue, 22 Nov 2022 18:40:37 +0000 (19:40 +0100)]
extension-tool: Fix falling back to GSettings
When we switched the tool to the public Extensions service, the
fallback to GSettings broke in the case GNOME is installed but
not running (because the service can be autostarted, albeit it'll
fail later).
Fix this by also falling back when we don't get a response from
gnome-shell.
Florian Müllner [Thu, 2 Feb 2023 22:37:21 +0000 (23:37 +0100)]
croco: Use g_string_free() return value
glib now warns if the return value is not used, so use the API as
intended instead of assigning the character data separately before
freeing the GString.
Florian Müllner [Thu, 26 Jan 2023 02:36:03 +0000 (03:36 +0100)]
st/texture-cache: Port to StIconTheme
It's finally time to pull the switch and replace GtkIconTheme with
out modified copy. This removes another Gtk dependency that ties
us to the old Gtk3.
Florian Müllner [Wed, 25 Jan 2023 18:29:25 +0000 (19:29 +0100)]
st/icon-theme: Stop using GdkRGBA for coloring symbolics
We already have ClutterColor to represent a color, and StIconColors
to hold color information for symbolics from CSS. Now that we moved
GtkIconTheme in-tree, we can make use of those types instead of
translating back and forth from GdkRGBA.
Florian Müllner [Wed, 1 Feb 2023 15:10:28 +0000 (16:10 +0100)]
st/icon-theme: Use standard GObject macros
The GTK code predates the G_DECLARE_*() macros, so it's under- standable
that it still does all the boilerplate manually. We
don't have that excuse in 2023, so move the the standard macros.
There is no reason for GtkIconTheme to be derivable, and as that
means that the instance struct itself is private, stop adding
separate private instance data.
Florian Müllner [Wed, 1 Feb 2023 14:24:09 +0000 (15:24 +0100)]
st/icon-theme: Replace GTK's custom i18n support
GTK uses its own private i18n header, which most notably defines
an I_() macro for interning static strings. That may be a worthwhile
idea for the entire codebase, but as it's out of scope for this
change set, just use the standard i18n support from glib for now.
Those are GTK internals that don't apply to us. Without the distinct
"screen's default icon theme", we also don't need custom theme support,
and can just always track the theme from StSettings.
Florian Müllner [Thu, 26 Jan 2023 00:41:32 +0000 (01:41 +0100)]
st/icon-theme: Remove Win32 compatibility
gnome-shell does not run on Windows, and if someone was crazy enough
to try to make it work, the icon theme support would be the least
of their worries.
Florian Müllner [Thu, 26 Jan 2023 02:32:52 +0000 (03:32 +0100)]
st/icon-theme: Standard types
The GTK code dates back to a time when "gchar" and friends were
still considered a good idea. Replace them with standard types
except for "guint" (I'm lazy) and GtkIconCache code that relies
on glib's byte order macros.
Florian Müllner [Wed, 1 Feb 2023 15:57:35 +0000 (16:57 +0100)]
st/icon-theme: Define default icon theme
In GTK, the value comes from another private header. It doesn't
make sense to copy it in its entirety, just define the one value
we actually need ourselves.
Florian Müllner [Wed, 1 Feb 2023 12:21:08 +0000 (13:21 +0100)]
st/icon-theme: Merge private header
GtkIconTheme's headers are split between a public and a private
one. We won't expose the icon theme API at all, nor do we need
to access anything beyond what the texture cache is currently
using, so merge the private header into the implementation.
Florian Müllner [Wed, 1 Feb 2023 14:19:47 +0000 (15:19 +0100)]
st/icon-theme: Copy GdkPixbuf utility code
GTK includes a couple of shared private GdkPixbuf utilities
functions. We don't have a need for sharing that code, just
for the bits that are used by the IconTheme code.
Florian Müllner [Tue, 10 Jan 2023 19:40:21 +0000 (20:40 +0100)]
st/icon-theme: Copy GTK3 code in-tree
GTK4 changed icon loading significantly, it is now closely tied
to snapshots and paintables. This makes a port highly unrealistic,
so to avoid staying stuck on GTK3 forever, copy the relevant code
into the tree.
The code is unmodified except for the include names and replacing
some stray tab indentation. It is still full of GTK internals, so
it will take a while before we can actually build it.
If gnome-disk-utility is not installed on the system, its desktop file is
unavailable, so we can't get the application's name. In this case hide
the launcher button.
Takao Fujiwara [Tue, 31 Jan 2023 08:42:23 +0000 (17:42 +0900)]
inputMethod: Make set_surrounding() send also empty string
Empty surrounding text values needs to be sent to IBus engines
so that the engines know the focus is changed and the values are
updated.
Also InputMethod can forward the "require-surrounding-text" signal
from IBus engine to mutter.
Jonas Dreßler [Fri, 24 Jun 2022 14:02:54 +0000 (16:02 +0200)]
appDisplay: Move findBestPageToAppend() behavior to IconGrid
This behavior makes more sense to have in the iconGrid itself: When a
page is filled up with items, the new item should never go to the start
of the next page, but always to next empty slot.
Jonas Dreßler [Fri, 24 Jun 2022 13:17:51 +0000 (15:17 +0200)]
appDisplay: Fix multi-page dragging behavior in folders
Folders reflow across pages because they don't set
allow_incomplete_pages to true. This means we want the nudging of items
to happen slightly differently when dragging an item across pages:
- When dragging from lower page index to a higher one, always reflow
towards the start of the grid (because there's now an empty slot on the
old page and items on the new page will force-reflow towards that)
- When dragging from a higher page index to a lower one, we can reflow to
the end as we usually do
To archive this, factor out the selection of "reflow direction" into a
separate variable that always defaults to "end" (because empty space is
always at the end of the grid). Set it to "start" when the item created an
empty slot on the current page or (and this is new:) on a previous page in
the folder case.
Jonas Dreßler [Fri, 24 Jun 2022 11:50:42 +0000 (13:50 +0200)]
iconGrid: Also consider left/right empty space as drop targets
Make it a bit easier to drag items to the start of pages by also taking
the left and right empty space into account, instead of considering it
an invalid target.